<template>
  <div class="app-container">
    <el-row :gutter="20" type="flex">
      <el-col style="width: 300px;">
        <pointList v-on:handlePointClick="handlePointClick"></pointList>
      </el-col>
      <el-col>
        <el-card class="box-card" :style="{height: tabHt+'px'}">
          <el-form ref="form" :model="form" :rules="rules" label-width="80px" style="width: 800px;">
            <el-row>
              <el-col :span="24">
                <el-form-item>
                  <el-button type="primary" @click="downTxt" >实时招测</el-button>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="信息记录" >
                  <el-input type="textarea" :rows="10" v-model="msg" readonly  />
                </el-form-item>
              </el-col>

            </el-row>
          </el-form>
        </el-card>
      </el-col>
    </el-row>

  </div>
</template>

<script>
  import pointList from "@/views/components/pointTreeList";
  import { v4 as uuidv4 } from 'uuid'

  export default {
    name: "DutyRelBidtest",
    components: { pointList },
    data() {
      return {
        dateRange:'',
        fhMsg:'',
        msg:'',
        queryParams:{
          deviceNo:null,
        },
        // 表单参数
        form: {
          bw:'',
        },
        // 表单校验
        rules: {

        }
      };
    },
    computed: {
      tabHt(){
        return this.$store.state.app.tableHeight.pointHt
      }
    },
    created() {
    },
    methods: {
      downTxt(){
        let onlyUuid = uuidv4();

        let nowDate = new Date();
        let byear = nowDate.getFullYear();
        let bmonth = (nowDate.getMonth() + 1 + '').padStart(2, '0');
        let bday = (nowDate.getDate()+ '').padStart(2, '0');
        let bhours = (nowDate.getHours()+ '').padStart(2, '0');
        let seconds = (nowDate.getSeconds()+ '').padStart(2, '0');
        let minutes = (nowDate.getMinutes()+ '').padStart(2, '0');
        let sj = `${byear}-${bmonth}-${bday} ${bhours}:${seconds}:${minutes}`
        this.msg = sj + '【接收】' + onlyUuid +'\n' + this.msg;

      },
      handlePointClick(obj){

      },
    }
  };
</script>
